/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.agi.devsol.aplicacao.comum;

import javax.enterprise.context.Conversation;
import javax.inject.Inject;

/**
 *
 * @author rgrosz
 */
public abstract class EditorEntidadeConversation<T> extends EditorEntidade<T> {
    @Inject
    private Conversation conversation; 
    
    public void setConversation(Conversation conversation){
        this.conversation = conversation;
    }
    
    public void initConversation(){
        if(!conversation.isTransient()){
            conversation.end();
        }
        conversation.begin();
    }

   
}
